{#
(C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com>

This file is part of "vikuit".

"vikuit" is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

"vikuit" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with "vikuit".  If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layouts/module-layout.html" %}
{% block title %}
	{{ _('Change password') }}
{% endblock %}

{% block content %}
	<h1>{{ _('Change password') }}</h1>
		<form action="/module/user.changepassword" method="post" accept-charset="utf-8">
		<input type="hidden" name="auth" value="{{ auth }}" />

		<input type="hidden" name="redirect_to" value="{{ redirect_to }}" />

		{% if error %}
			<p class="center" style="color:red">{{ _(error) }}</p>
		{% endif %}

		<div class="form">
			<p>
				<label for="old_password">{{ _('Current password') }}</label>
				<input id="old_password" type="password" name="old_password" value="" style="width:200px" maxlength="12" />
			</p>
			<p>
				<label for="password">{{ _('New password') }}</label>
				<input type="password" name="password" value="" style="width:200px" maxlength="12" />
			</p>
			<p>
				<label for="re_password">{{ _('New password (validation)') }}</label>
				<input type="password" name="re_password" value="" style="width:200px" maxlength="12" />
			</p>
			<p><input type="submit" value="{{ _('Change password') }}" /></p>
		</div>

	</form>
{% endblock %}

{% block javascript %}
<script type="text/javascript" charset="utf-8">
	$('old_password').focus()
</script>
{% endblock %}